package com.test.demo.consumer;

import com.test.demo.dao.pojo.OrderPaid;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;


/**
 * @author Gao
 */
@Slf4j
@Service
@RocketMQMessageListener(consumeMode = ConsumeMode.CONCURRENTLY, selectorType = SelectorType.TAG, topic = "selector_topic",
        consumerGroup = "my-consumer-nxwl_selector_topic", selectorExpression = "tag2")
public class SelectorConsumer2 implements RocketMQListener<OrderPaid> {

    @Override
    public void onMessage(OrderPaid message) {
        log.info("tag2===========>>>消息过滤消费端接收到消息:{}", message);
    }
}
